package com.lzq.springblog.model;

import lombok.Data;
import org.springframework.stereotype.Component;

@Component
@Data
public class PageRequest {
    private Integer currentPage = 1;
    private Integer pageSize = 5;
    private Integer offset;

    public int getOffset() {
        return (currentPage-1) * pageSize;
    }
}
